package com.example.neusoft.a16110100126yttordering.model;

import android.net.sip.SipSession;

import com.example.neusoft.a16110100126yttordering.common.Constants;
import com.example.neusoft.a16110100126yttordering.listener.RetrofitListener;
import com.example.neusoft.a16110100126yttordering.service.FoodService;
import com.example.neusoft.a16110100126yttordering.service.ShopService;

import retrofit2.Call;


public class FoodModel extends RetrofitBaseModel {
    private FoodService foodService;
    public FoodModel(){
        this.foodService=retrofit.create(FoodService.class);
    }
    public void getFoodByShop(int shop_id, RetrofitListener listener){
        Call call=foodService.getFoodByShop(shop_id);
        bindCallback(call,listener,Constants.GETFOODBYSHOP);

    }
    public void isCollected(int user_id,int shop_food_id,int flag, RetrofitListener listener){
//        System.out.println(user_id+"+++++++++++"+shop_food_id+"]]]]]]]]]]"+flag);
        Call call=foodService.isCollected(user_id,shop_food_id,flag);
        bindCallback(call,listener,Constants.ISCOLLECTED);
    }
    public void userCollectShop(int user_id,int shop_id,RetrofitListener listener){
        Call call=foodService.userCollectShop(user_id,shop_id);
        System.out.println(user_id+"-----------ytt--====kawayi-----------"+call);
        bindCallback(call,listener,Constants.USERCOLLECTSHOP);
    }
}
